/* 标题栏样式 */
.title-bar {
    height: 40px;
    background: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px;
    border-bottom: 1px solid #e0e0e0;
    -webkit-app-region: drag;
}

/* 确保右侧内容始终在右边 */
.title-bar-right {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-left: auto; /* 这确保右侧内容始终靠右 */
}

.title-bar-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.app-icon {
    color: #ff4757;
    font-size: 16px;
}

.app-title {
    font-size: 14px;
    font-weight: 500;
}

.title-bar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-name {
    font-size: 12px;
    color: #666;
}

.window-controls {
    display: flex;
    -webkit-app-region: no-drag;
}

.control-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #666;
}

.control-btn:hover {
    background: #f0f0f0;
}

.close-btn:hover {
    background: #ff4757;
    color: white;
}

/* 账号下拉菜单样式 */
.account-dropdown {
    position: relative;
}

.account-trigger {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s ease;
    -webkit-app-region: no-drag;
}

.account-trigger:hover {
    background: #f5f5f5;
}

.account-trigger .user-name {
    font-size: 12px;
    color: #333;
    font-weight: 500;
}

.dropdown-arrow {
    font-size: 10px;
    color: #666;
    transition: transform 0.2s ease;
}

.account-dropdown.active .dropdown-arrow {
    transform: rotate(180deg);
}

.account-menu {
    position: absolute;
    top: 100%;
    right: 0;
    width: 280px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    margin-top: 8px;
}

.account-dropdown.active .account-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.account-menu-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px 8px 0 0;
}

.account-avatar {
    width: 40px;
    height: 40px;
    background: #ff4757;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
}

.account-info {
    flex: 1;
}

.account-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 2px;
}

.account-email {
    font-size: 12px;
    color: #666;
}

.account-menu-divider {
    height: 1px;
    background: #e0e0e0;
}

.account-menu-items {
    padding: 8px 0;
}

.account-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    cursor: pointer;
    transition: background 0.2s ease;
    font-size: 13px;
    color: #333;
}

.account-menu-item:hover {
    background: #f5f5f5;
}

.account-menu-item i {
    width: 16px;
    color: #666;
    text-align: center;
}

.account-menu-item[data-action="upgrade"] {
    color: #ff4757;
}

.account-menu-item[data-action="upgrade"] i {
    color: #ff4757;
}

.account-menu-item[data-action="logout"] {
    color: #dc3545;
}

.account-menu-item[data-action="logout"] i {
    color: #dc3545;
}


/* 游客状态样式 */
.guest-header {
    background: #fff3cd;
}

.guest-avatar {
    background: #ffc107;
}

.guest-limitation {
    background: #fff3cd;
    color: #856404;
    font-size: 12px;
    padding: 8px 16px;
    border-radius: 4px;
    margin: 0 8px;
}

.guest-limitation i {
    color: #ffc107;
}